package com.springboot.fwwb09.service;


import com.springboot.fwwb09.dao.emplyoeeDAO;
import com.springboot.fwwb09.entity.emplyoee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional//控制事务
public class emplyoeeServiceImpl implements emplyoeeService {

    @Autowired
    private emplyoeeDAO emplyoeeDAO;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<emplyoee> findAll() {
        return emplyoeeDAO.findAll();
    }
}
